package pe.com.bbva.reniec.dominio.quartz;

// Generated 2/10/2013 03:54:44 PM by Hibernate Tools 3.4.0.CR1

import java.io.Serializable;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * QrtzTriggerListeners generated by hbm2java
 */
@Entity
@Table(name = "QRTZ_TRIGGER_LISTENERS")
@SuppressWarnings("serial")
public class QrtzTriggerListeners implements Serializable {

	private QrtzTriggerListenersId id;
	private QrtzTriggers qrtzTriggers;

	public QrtzTriggerListeners() {
	}

	public QrtzTriggerListeners(QrtzTriggerListenersId id,
			QrtzTriggers qrtzTriggers) {
		this.id = id;
		this.qrtzTriggers = qrtzTriggers;
	}

	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "triggerName", column = @Column(name = "TRIGGER_NAME", nullable = false, length = 200)),
			@AttributeOverride(name = "triggerGroup", column = @Column(name = "TRIGGER_GROUP", nullable = false, length = 200)),
			@AttributeOverride(name = "triggerListener", column = @Column(name = "TRIGGER_LISTENER", nullable = false, length = 200)) })
	public QrtzTriggerListenersId getId() {
		return this.id;
	}

	public void setId(QrtzTriggerListenersId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumns({
			@JoinColumn(name = "TRIGGER_NAME", referencedColumnName = "TRIGGER_NAME", nullable = false, insertable = false, updatable = false),
			@JoinColumn(name = "TRIGGER_GROUP", referencedColumnName = "TRIGGER_GROUP", nullable = false, insertable = false, updatable = false) })
	public QrtzTriggers getQrtzTriggers() {
		return this.qrtzTriggers;
	}

	public void setQrtzTriggers(QrtzTriggers qrtzTriggers) {
		this.qrtzTriggers = qrtzTriggers;
	}

}
